/*
 *
 *  * Copyright (c) 2016. For Intelligent Group.
 *
 */

package com.intelligent.ispc.client.event;

import com.intelligent.ispc.common.utils.ResourceBundleUtils;
import com.intelligent.ispc.constant.ProcessConstant;

/**
 * Created by Peter on 2016/7/26.
 */
public class StatusBarProcessChangeEvent {

    private String taskName;
    private Integer point;
    private String log;
    private String level = ProcessConstant.INFO;

    /**
     * Constructor.
     */
    public StatusBarProcessChangeEvent() {
    }

    /**
     * Constructor.
     *
     * @param taskName String
     * @param log      String process log
     */
    public StatusBarProcessChangeEvent(String taskName, String log) {
        this.taskName = taskName;
        this.log = ResourceBundleUtils.getString(log);
    }

    /**
     * Constructor.
     *
     * @param taskName String
     * @param point    int process point
     */
    public StatusBarProcessChangeEvent(String taskName, int point) {
        this.taskName = taskName;
        this.point = point;
    }

    /**
     * Constructor.
     *
     * @param taskName String
     * @param point    int process point
     * @param log      String process log
     */
    public StatusBarProcessChangeEvent(String taskName, int point, String log) {
        this.taskName = taskName;
        this.point = point;
        this.log = ResourceBundleUtils.getString(log);
    }

    /**
     * Set the event level.
     *
     * @param level String
     * @return StatusBarProcessChangeEvent
     */
    public StatusBarProcessChangeEvent level(String level) {
        this.level = level;
        return this;
    }

    public String getLog() {
        return log;
    }

    public void setLog(String log) {
        this.log = log;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public Integer getPoint() {
        return point;
    }

    public void setPoint(Integer point) {
        this.point = point;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }
}
